@import './normalize.scss';
@import './markdown.scss';

/*定义滚动条高宽及背景 高宽分别对应横竖滚动条的尺寸*/
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

/*定义滚动条轨道 内阴影+圆角*/
::-webkit-scrollbar-track {
  border-radius: 10px;
}

/*定义滑块 内阴影+圆角*/
::-webkit-scrollbar-thumb {
  position: relative;
  display: block;
  cursor: pointer;
  border-radius: 4px;
  background-color: hsla(220, 4%, 58%, 0.3);
  transition: background-color 0.3s;
}

body {
  font-family: 'Nunito', 'Helvetica', Arial, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
  word-break: keep-all;

  &:hover {
    color: #000;
    font-weight: 600;
  }
}

button {
  outline: none;
  box-shadow: none;
}

#app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;

  main {
    flex: 1;
    overflow: hidden;

    > * {
      padding: 1rem 1rem 0;
      height: 100%;
      overflow: auto;
    }
  }

  .el-menu-item > a {
    display: inline-block;
    position: relative;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    &:hover {
      color: inherit;
    }
  }

  .el-menu--horizontal > .el-menu-item.is-active {
    border-bottom-color: #000 !important;
  }

  .el-menu-item.is-active {
    font-weight: 600;
  }

  .el-tabs__nav-scroll {
    padding: 0 20px;
  }

  .toc-container {
    width: 200px;
    max-height: 80vh;
    font-size: 0.8rem;
    overflow: auto;
    background-color: #fff;

    &::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      width: 1px;
      height: 100%;
      background-color: rgb(230, 236, 241);
    }

    &::-webkit-scrollbar {
      width: 0px;
      height: 0px;
    }

    ul {
      position: static;
      list-style: none;
      padding-left: 8px;
      overflow-x: hidden;
    }

    > div > ul {
      padding: 0;
    }

    li {
      position: static;
      a {
        position: static;
        display: inline-block;
        width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        padding: 7px 0 7px 16px;

        &::before {
          content: '';
          position: absolute;
          width: 1px;
          left: 0;
          height: 16px;
        }

        &.router-link-exact-active {
          color: #000;
          font-weight: 600;

          &::before {
            background-color: #000;
          }
        }
      }
    }
  }
}
